package com.yhy.common.wechat.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * wechat mini app properties
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "wx.pay")
public class WxPayProperties {

    /**
     * 多个微信支付配置信息
     */
    private List<PayConfig> configs;

    @Data
    public static class PayConfig {
        /**
         * appid
         */
        private String appId;
        /**
         * secret
         */
        private String secret;
        /**
         * 商户id
         */
        private String mchId;
        /**
         * 商户key
         */
        private String mchKey;
        /**
         * 回调地址
         */
        private String notifyUrl;
    }
}
